﻿using System.Collections.Generic;
using Gp.Scripts.Core;
using Gp.Scripts.Data.Skills;
using Gp.Scripts.Equip;

namespace Gp.Scripts.Data.Equip.Impl {
    [WeaponPhrase("分解力场", "充能后，对护甲板和盾牌伤害翻倍。")]
    public class DissolveFieldPhrase : WeaponPhraseDecorator{
        public override bool AfterAttack(BaseUnit target, AttackActionResult atkResult) {
            // if (Entity.Info is not MeleeWeaponInfo {isCharged: true} melee) return false;
            if (atkResult.DamageMake <= 0) return false;
            
            TextEffect(target, "分解");
            return true;
        }


        public override IEnumerable<SkillTags> Tags() {
            // if (Entity.Info is not MeleeWeaponInfo {isCharged: true}) yield break;
            yield return SkillTags.DissolveField;
        }
    }
}